﻿using DAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class UserBLL
    {
        public UserDAL UserDAL { get; }

        public UserBLL(UserDAL userDAL)
        {
            UserDAL = userDAL;
        }
        /// <summary>
        /// 用户添加
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int UserAdd(UserModel info)
        {
            try
            {
               return UserDAL.UserAdd(info);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 用户管理员登录
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public int Login(string UserName, string Password)
        {
            try
            {
               return UserDAL.Login(UserName, Password);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
